package com.hzj.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzj.mapper.RefundInfoMapper;
import com.hzj.pojo.RefundInfo;
import com.hzj.service.RefundInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RefundInfoServiceImpl extends ServiceImpl<RefundInfoMapper, RefundInfo> implements RefundInfoService {

   @Autowired
    RefundInfoMapper rm;

    @Override
    public boolean updateRefundInfo(RefundInfo refundInfo) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("out_trade_no",refundInfo.getOutTradeNo());
        return saveOrUpdate(refundInfo,wrapper);
    }

    @Override
    public int selectCount() {
        return rm.selectCount();
    }
}
